package com.d0317.Z17;

import java.util.Arrays;
import java.util.Scanner;

public class Number {
   static int[]a=new int [5];
   void reverse(){
       for(int i=4;i>=0;i--){
           System.out.print(a[i]+" ");
       }
   }
   void PaiXu(){
     Arrays.sort(a);
     for(int i=0;i<5;i++)
       System.out.print(a[i]+" ");
   }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Number number=new Number();
        System.out.println("请输入五个数:");
        for(int i=0;i<5;i++){
          int b=sc.nextInt();
          a[i]=b;
        }
        number.reverse();
        System.out.println();
        number.PaiXu();


    }
}
